home *** CD-ROM | disk | FTP | other *** search
/ The Programmer Disk / The Programmer Disk (Microforum).iso / xpro / extra / pro13 / stricmp.c < prev    next >
C/C++ Source or Header  |  1993-02-01  |  324b  |  21 lines

  1. /*
  2.     stricmp.C
  3.  
  4.     Copyright (C) 1993, Geoff Friesen B.Sc.
  5.     All rights reserved.
  6. */
  7.  
  8. #define    INCL_STRICMP
  9.  
  10. #ifndef    INCL_TOUPPER
  11. #include "toupper.C"
  12. #endif
  13.  
  14. int stricmp (const char *s1, const char *s2)
  15. {
  16.    for (; toupper (*s1) == toupper (*s2); s1++, s2++)
  17.     if (!*s1)
  18.         return 0;
  19.  
  20.    return (*s1-*s2);
  21. }